package top.scauwlt.loadbalance;

import top.scauwlt.extension.SPI;
import top.scauwlt.remoting.dto.RpcRequest;

import java.util.List;

/**
 * @Author wmm
 * @Date 2022/7/24 17:12
 */
@SPI
public interface LoadBalance {
    /**
     * 负载均衡，从地址列表中选出一个提供服务
     *
     * @param serviceUrlList
     * @param rpcRequest
     * @return
     */
    String selectServiceAddress(List<String> serviceUrlList, RpcRequest rpcRequest);
}
